<template>
	<view class="">
		<view class="lists">
				<view class="list p-3 j-sb" v-if="info_announces[0].type==1" @tap="wait_pay()">
					<view class="row j-sb flex-nowrap" >
						<view class="list_bglogo">订单</view>
						<view class="pl-2 list_text">
							<view class="font-md" style="color: #333333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">
								订单未付款
							</view>
							<view class="font-sm" style="color:#999999;" v-if="info_announces[0].time">
								您有订单未付款
							</view>
							<view class="font-sm" style="color:#999999;" v-else>暂无信息</view>
						</view>
					</view>
				</view>
				<view class="list p-3 j-sb" v-if="info_announces[1].type==2" @tap="agnet_ed()">
					<view class="row j-sb flex-nowrap" >
						<view class="list_bglogo">短信</view>
						<view class="pl-2 list_text">
							<view class="font-md" style="color: #333333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">
								系统短信
							</view>
							<view class="font-sm" style="color:#999999;" v-if="info_announces[1].time">
								您申请的门店已经通过系统审核，请及时查看
							</view>
							<view class="font-sm" style="color:#999999;" v-else>暂无信息</view>
						</view>
					</view>
				</view>
			
		</view>
	</view>
</template>

<script>
	import request from '@/common/lib/request.js'
	export default {
		data() {
			return {
				baseUrl:request.common.baseUrl,
				info_announces:[]
			}
		},
		onLoad:function(){
			uni.request({
				url: request.common.baseUrl+'/api/users/info_announce',
				data: {
					token:uni.getStorageSync('keyToken')
				},
				header: {
					'Content-Type':'application/json;charset=UTF-8',
					'Content-Type':'application/x-www-form-urlencoded'
				},
				success: (res) => {
					console.log(res)
					if(res.data.code==200){
						this.info_announces=res.data.data
					}
				}
			});
		},
		methods: {
			wait_pay(){
				uni.navigateTo({
					url:"/pages/orderlist/orderlist?state=1"
				})
			},
			agnet_ed(){
				uni.navigateTo({
					url:"/pages/agent/myagents"
				})
			}
		}
	}
</script>

<style>
.list{
	border-bottom:1upx solid #f6f6f6;
}
.list_bglogo{
	width:100upx;
	height:100upx;
	border-radius:50%;
	color:#FFFFFF;
	text-align:center;
	line-height:100upx;
}
.list:nth-child(odd) .list_bglogo{
	background-color:#ff6101;
}
.list:nth-child(even) .list_bglogo{
	background-color:#1366ea;
}
.list_text{
	width:580upx;
}
</style>
